<form clrStepper (ngSubmit)="onFormSubmit()" [formGroup]="formGroup">
  <div
    class="step-item"
    *ngFor="let step of steps; index as i; trackBy: trackByFn"
  >
    <clr-stepper-panel [formGroupName]="step.name">
      <clr-step-title>{{ step.title }}</clr-step-title>
      <clr-step-description>{{ step.description }}</clr-step-description>
      <clr-step-content>
        <app-form-view-container
          [formGroupContainer]="formGroupFromName(step)"
          [form] = "step.form"
        ></app-form-view-container>

        <button
          class="submit"
          *ngIf="v.config.steps.length - 1 === i; else elseBlock"
          clrStepButton="submit"
        >
          submit
        </button>
        <ng-template #elseBlock
          ><button class="next" clrStepButton="next">next</button></ng-template
        >
      </clr-step-content>
    </clr-stepper-panel>
  </div>
</form>
